﻿
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;

namespace FictionsDownload.Static
{
    public static class StringEx
    {
        public static bool UrlDnsEquals(this string urlLeft, string urlRight)
        {
            Uri left = new Uri(urlLeft);
            Uri right = new Uri(urlRight);
            if (left.DnsSafeHost == right.DnsSafeHost)
            {
                return true;
            }
            else
            {
                return false;
            }
        }
        public static string ToUrlDns (this string Url)
        {
            Uri left = new Uri(Url);
            return left.DnsSafeHost;
        }
    }
}